package com.tanhua.admin.controller;

import com.tanhua.admin.service.ManagementService;
import com.tanhua.model.vo.SummaryVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/dashboard")
public class ManagementController {

    @Autowired
    private ManagementService managementService;

//    //新增、活跃用户、次日留存率
//    @GetMapping("/users")
//    public ResponseEntity users(@RequestBody UsersDto dto){
//        AnalysisVo vo = managementService.users(dto);
//        return ResponseEntity.ok(vo);
//    }

    //概要统计信息
    @GetMapping("/summary")
    public ResponseEntity summary(){
        SummaryVo vo =  managementService.summary();
        return ResponseEntity.ok(vo);
    }
}
